package com.tianji.promotion.service;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.dto.CodeQuery;
import com.tianji.promotion.dto.ExchangeCodeStatus;
import com.tianji.promotion.entity.ExchangeCode;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDateTime;

/**
 * <p>
 * 兑换码 服务类
 * </p>
 *
 * @author xjs
 */
public interface IExchangeCodeService extends IService<ExchangeCode> {

    void asyncGenerateExchageCode(int totalNum, Long couponId, LocalDateTime issueEndTime);

    void deleteByCouponId(Long id);

    PageDTO<ExchangeCode> pageQuery(CodeQuery query);

    void updateExchangeCode(long exchangeCodeId, Long userId, ExchangeCodeStatus used);
}
